home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
422mods.zip
/
TFC018.422
< prev
next >
Wrap
Text File
|
1993-03-20
|
3KB
|
120 lines
2TFC018.MOD 1Logoff Countdown Delay
The Flying Chicken [SysOp] #1 @12456
3Friday, March 19, 1993 1 5:52 pm
TFC018.MOD - Logoff Countdown Delay
Author: The Flying Chicken
Source: WWIV 4.20-4.22
Version: 1.2
When using batch downloads, you have the option to log off after
the transfer is complete. Well, I have sometimes wished I could
abort that feature, so this is the mod to do it. I counts down
from 5 to 1, and at 1 it logs the user off. If the user types
Ctrl-K, the logoff will be aborted.
v1.2 - Upgrade for 4.22
v1.0 - Initial release
Before using this or any mod, back up your source !!!!!
PKZIP source *.c *.h *.mak
1. First, load up FCNS.H and search for /* File: batch.c */. Then
add the following line, as shown.
void run_cmd(char *cmdln, char *downlist, char *uplist, char *dl, int had);
void process_dszlog();
void dszbatchdl(int had, char *cmdln, char *desc);
void dszbatchul(int had, char *cmdln, char *desc);
void bibatch(int had, int pn);
void batchdl();
void logoff_countdown(int *had); /* ADD */
2. Save FCNS.H and load up BATCH.C. Search for void ymbatchdl() and
and the following function right before it.
void logoff_countdown(int *had) /* ADD ENTIRE VOID */
{
int i;
char ch;
nl();
prt(1,"Logoff sequence commencing. Type [Ctrl-K] to abort logoff.");
nl();nl();
ansic(2);
for (i=5;((*had) && (i>0));i--) {
npr("%d",i);
delay(1000);
ch=inkey();
if (ch==11)
*had=0;
else
npr("\b");
}
nl();
if (!(*had)) {
nl();
prt(1,"Logoff sequence aborted. Returning to the BBS.");
nl();
}
}
3. Scroll down towards the end of ymbatchdl() and make these changes.
if (rr) {
nl();
pl("Your ratio is too low to continue the transfer.");
nl();
}
if (had) {
logoff_countdown(&had); /* ADD */
if (had) { /* ADD */
dtr(0);
hangup=1;
} /* ADD */
}
}
4. Search for void rum_cmd() and make these changes.
if (uplist[0])
cd_to(syscfg.batchdir);
run_external1(s);
cd_to(cdir);
if (had) {
logoff_countdown(&had); /* ADD */
if (had) { /* ADD */
dtr(0);
hangup=1;
if (modem_flag & flag_ec) /* in 4.22 ONLY */
wait1(36) /* in 4.22 ONLY */
else /* in 4.22 ONLY */
wait1(2);
if (!cdet()) {
dtr(1);
wait1(5); /* in 4.22 ONLY */
wait1(2); /* pre 4.22 ONLY */
holdphone(1);
}
} /* ADD */
} else {
nl();
pl("Please wait...");
DISCLAIMER: I make no guarantees with this mod whatsoever.
Your installation of the mod is your acceptance of any
damages caused to your hardware or software, incendental or
otherwise.
PLEASE REPORT ANY BUGS.